-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not trigger a watch of pods for status owner ref #754
Do not trigger a watch of pods for status owner ref #754
Conversation
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
that did the trick! first bump is redeploy of previous version and next bump is deploy of 244b191 from this pr 🎉 |
@@ -317,14 +321,28 @@ func (r *ReconcileConstraint) Reconcile(request reconcile.Request) (reconcile.Re | |||
} | |||
|
|||
func (r *ReconcileConstraint) defaultGetPod() (*corev1.Pod, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be reused between the 2 controllers without copy-pasting it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified the two functions, PTAL.
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Max Smythe <smythe@google.com>
…t#754) * Do not trigger a watch of pods for status owner ref Signed-off-by: Max Smythe <smythe@google.com> * Run goimports Signed-off-by: Max Smythe <smythe@google.com> * Do not use cache for retrieving pod Signed-off-by: Max Smythe <smythe@google.com> * Unify getPod and add flag to toggle enabling fake get pod Signed-off-by: Max Smythe <smythe@google.com> * Fix lint errors Signed-off-by: Max Smythe <smythe@google.com> * Fix nil pointer error Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe smythe@google.com
What this PR does / why we need it:
This PR should avoid triggering a watch of all pods in the cluster when getting the self-referenced pod.
This also re-adds the ability to run Gatekeeper outside of a Kubernetes cluster for testing purposes, per #738
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #742
Special notes for your reviewer: